package yiranyousheng.com.alarm_r;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.media.MediaPlayer;

public class AlarmReceiver extends BroadcastReceiver {
    private  MediaPlayer player;


    public AlarmReceiver() {

    }

    @Override
    public void onReceive(Context context, Intent intent) {
        // TODO: This method is called when the BroadcastReceiver is receiving

        System.out.println("AlarmReceiver onReceive");
        Intent i =  new Intent(context,MainActivity.class);
        i.putExtra(MainActivity.ALARM_FLAG,MainActivity.ALARM_FLAG);
        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
       context.startActivity(i);
    }
}
